package BNS.kingPawn;

/**
 * Used to maintain state (tip amounts in both directions) of an edge in the graph.
 * Intended for run-time data only, not kept in the BNSGame.
 * @author Stephen Judd &lt;sjudd@seas.upenn.edu&gt;
 * @version $Rev$
 */
public class EdgeState implements java.io.Serializable {
	// TODO: Remove this class??
	/* Tips were first designed to be specific to different neighbours, and hence this class
	was built to represent that generality. The tip notion was revised later to be a single
	quantity that applied uniformly to all neighbours. Hence this class could now be supplanted 
	by keeping data in the Nodes. */
	
	private static final long serialVersionUID = 01L;
	// variables fr__ and to__ denote the from node and the to node.
    public int frIdx, toIdx;		// indexes of the nodes
    public int frRol, toRol;		// roles of the nodes
	public float frTip, toTip;	// tips of each player toward the other
	
	public EdgeState(int frIdx, int toIdx, int rol) { 
		this.frIdx=frIdx; this.toIdx=toIdx; frRol=toRol=rol; frTip=toTip=0.0f; }
	
	public String toString() {
		return "<"+frIdx+"("+frRol+")"+frTip+", "+toIdx+"("+toRol+")"+toTip+">"; }
	}
